package com.kylin.function;

import java.util.function.Supplier;

//Supplier 供给型接口 没有参数 只有返回值
public class Demo04 {

    public static void main(String[] args) {

        Supplier<String> supplier = new Supplier<String>() {
            @Override
            public String get() {
                return "test";
            }
        };

        System.out.println(supplier.get());

        Supplier<String> supplier1 = ()->{return "lambda";};
        System.out.println(supplier1.get());
    }
}
